r8tris2 Interface

interface
public subroutine r8tris2(node_num, node_xy, triangle_num, triangle_node, triangle_neighbor)

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: node_num

The number of vertices.

real(kind=real64), intent(inout) :: node_xy(2,node_num)

The coordinates of the vertices. On output, the vertices have been sorted into dictionary order.

integer(kind=int32), intent(out) :: triangle_num

The number of triangles in the triangulation; TRIANGLE_NUM is equal to 2*NODE_NUM - NB - 2, where NB is the number of boundary vertices.

integer(kind=int32), intent(out) :: triangle_node(3,2*node_num)

The nodes that make up each triangle. The elements are indices of P. The vertices of the triangles are in counter clockwise order.

integer(kind=int32), intent(out) :: triangle_neighbor(3,2*node_num)

The triangle neighbor list. Positive elements are indices of TIL; negative elements are used for links of a counter clockwise linked list of boundary edges; LINK = -(3*I + J-1) where I, J = triangle, edge index; TRIANGLE_NEIGHBOR(J,I) refers to the neighbor along edge from vertex J to J+1 (mod 3).

Description

Constructs a Delaunay triangulation of 2D vertices.

The routine constructs the Delaunay triangulation of a set of 2D vertices using an incremental approach and diagonal edge swaps. Vertices are first sorted in lexicographically increasing (X,Y) order, and then are inserted one at a time from outside the convex hull.